import brightness from '@blueos.hardware.display.brightness'

export const setKeepScreenOn = () => {
  brightness.setKeepScreenOn({
    // @ts-ignore
    keepScreenOn: true,
    success: function () {
      console.log('handling success')
    },
    fail: function (data, code) {
      console.log(`handling fail, code = ${code}`)
    },
  })
}


export const setKeepScreenOff = () => {
  brightness.setKeepScreenOn({
    // @ts-ignore
    keepScreenOn: false,
    success: function () {
      console.log('handling success')
    },
    fail: function (data, code) {
      console.log(`handling fail, code = ${code}`)
    },
  })
}